<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%-- <%@include file="../common/commons.jspf"%> --%>
</head>
<body
	style="background-image: url('${basePath}static/img/background.jpg');">
	<%@include file="../common/top.jsp"%>

	<div class="form" style="margin-left: 50%; margin-top: 2%; width: 50%;">
		<form class="form-horizontal" role="form" id="updateEmpForm"
			action="${basePath }emp/update_emp.do" method="post">
			<input type="hidden" value="${employee.id }" name="id">
			<div class="form-group">
				<label for="username" class="col-sm-2 control-label">用户名：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<span class="input-group-addon glyphicon glyphicon-user"></span> <input
							type="text" name="name" id="username"
							class="form-control username-input" value="${employee.name }"
							required="required" style="margin-top: 1px" />
					</div>
				</div>
			</div>
			<div class="form-group">
				<label for="password" class="col-sm-2 control-label"
					style="margin-top: 1px">密码：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<input type="password" name="password" id="password"
							class="form-control pwd-input" 
							required="required" style="margin-top: 1px" /> <span
							class="input-group-addon glyphicon glyphicon-eye-open pwd-icon"
							style="cursor: pointer;"></span>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label for="idcard" class="col-sm-2 control-label"
					style="margin-top: 1px">身份证号：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<input type="text" name="idcard" id="idcard" class="form-control "
							value="${employee.idcard }" required="required"
							style="margin-top: 1px"
							onblur="getAddressAndSexByIdCard(this.value)" /> <span
							class="input-group-addon glyphicon glyphicon-credit-card"
							style="cursor: pointer;"></span>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label for="sex" class="col-sm-2 control-label"
					style="margin-top: 1px">性别：</label>
				<div class="col-sm-2">
					<div class="input-group login-input">
						<div class="switch">
							<input type="checkbox" style="margin-top: 1px" data-on-text="男"
								data-off-text="女" id="sex" name="sex" />
						</div>
					</div>
				</div>
				
				<label for="real_name" class="col-sm-2 control-label"
					style="margin-top: 2px;margin-left:-32px">姓名：</label>
				<div class="col-sm-2">
					<div class="input-group">
						<input type="text" name="realName" id="realName" class="form-control "
							 required="required" value=${employee.realName }
							style="margin-top: 1px;width: 100px;" 
							/><span class="input-group-addon glyphicon glyphicon-user"></span>
					</div>
				</div>
			</div>


			<div class="form-group">
				<label for="address" class="col-sm-2 control-label"
					style="margin-top: 1px">家庭住址：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<input type="text" name="address" id="address"
							class="form-control " value=${employee.address }
							required="required" style="margin-top: 1px" /> <span
							class="input-group-addon  	glyphicon glyphicon-map-marker"
							style="cursor: pointer;"></span>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label for="phone" class="col-sm-2 control-label"
					style="margin-top: 1px">电话号码：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<input type="text" name="phone" id="phone" class="form-control "
							value=${employee.phone } required="required"
							style="margin-top: 1px" onblur="getPhoneSupplier(this.value)" />
						<span class="input-group-addon  	glyphicon glyphicon-phone"
							style="cursor: pointer;"></span>
					</div>
					<div id="phoneTip" style="color: #3C763D"></div>
				</div>
			</div>

			<div class="form-group">
				<label for="email" class="col-sm-2 control-label"
					style="margin-top: 1px">电子邮件：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<input type="text" name="email" id="email" class="form-control "
							value=${employee.email } required="required"
							style="margin-top: 1px" /> <span
							class="input-group-addon glyphicon glyphicon-envelope"
							style="cursor: pointer;"></span>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label for="work_desc" class="col-sm-2 control-label"
					style="margin-top: 1px">工作内容：</label>
				<div class="col-sm-10">
					<div class="input-group login-input">
						<input type="text" name="workDesc" id="workDesc"
							class="form-control " value=${employee.workDesc } required="required"
							style="margin-top: 1px" /> <span
							class="input-group-addon  	glyphicon glyphicon-list-alt"
							style="cursor: pointer;"></span>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label for="hobby" class="col-sm-2 control-label"
					style="margin-top: 1px">爱好：</label>
				<div class="col-sm-10">
					<div class="btn-group" data-toggle="buttons">
						<label class="btn btn-primary"> <input type="checkbox" name="hobby" value="看电视">
							看电视
						</label> <label class="btn btn-primary"> <input type="checkbox" name="hobby"  value="乒乓球">
							乒乓球
						</label> <label class="btn btn-primary"> <input type="checkbox" name="hobby" value="羽毛球">
							羽毛球
						</label>
					</div>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary">确认修改</button>
				</div>
			</div>
		</form>
	</div>


	<script type="text/javascript" src="${basePath }static/js/update_emp.js"></script>
</body>
</html>